//
//  BasicMapAnnotation.m
//  ExpressData
//
//  Created by Sun Thurein Aung on 1/01/11.
//  Copyright 2011 __MyCompanyName__. All rights reserved.
//

#import "BasicMapAnnotation.h"

@interface BasicMapAnnotation()

@property (nonatomic) CLLocationDegrees latitude;
@property (nonatomic) CLLocationDegrees longitude;
@property (nonatomic, retain) NSString *title;
@property (nonatomic, retain) NSString *subtitle;

@end

@implementation BasicMapAnnotation

@synthesize latitude = _latitude;
@synthesize longitude = _longitude;
@synthesize title = _title;
@synthesize subtitle = _subtitle;

- (id)initWithLatitude:(CLLocationDegrees)latitude
		  andLongitude:(CLLocationDegrees)longitude 
				 title:(NSString*)title 
			  subtitle:(NSString *)subtitle{
	
	if (self = [super init]) {
		self.latitude = latitude;
		self.longitude = longitude;
		self.title = title;
		self.subtitle = subtitle;
	}
	return self;
}

- (CLLocationCoordinate2D)coordinate {
	CLLocationCoordinate2D coordinate;
	coordinate.latitude = self.latitude;
	coordinate.longitude = self.longitude;
	return coordinate;
}

- (void)setCoordinate:(CLLocationCoordinate2D)newCoordinate {
	self.latitude = newCoordinate.latitude;
	self.longitude = newCoordinate.longitude;
}

- (NSString *)title {
    return _title;
}

- (NSString *)subtitle
{
    return _subtitle;
}

@end
